package com.csu.bailan.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
public enum ResponseEnum {
    SUCCESS(200,"成功"),
    ERROR(0,"ERROR"),
    // 用户相关Response Code为300系
    NameorPasswordERROR(305,"用户名或密码错误"),
    NameisNullERROR(303,"用户名为空"),
    CreateUserERROR(304,"创建用户失败"),
    UserExistERROR(306,"用户已存在"),
    DeleteUserERROR(307,"删除用户表及密码表失败"),
    UpdateUserERROR(308,"更新用户信息失败"),
    UpdatePasswrodERROR(309,"密码更新失败"),
    PassWordInconsistentERROR(310,"两次密码不一致"),
    AddressUpdateERROR(311, "用户地址更行失败"),
    AddressCreateERROR(312, "用户地址创建失败"),
    // 全局参数异常为100系
    ARGUMENTILLEGAL(100, "参数校验异常"),
    // 商品相关Response Code为400系
    SPUNotExisted(401, "SPU不存在"),
    PageQueryError(402, "分页查询失败"),
    StockQueryError(403, "库存查询失败");

    private final Integer code;
    private final String message;
}
